<!DOCTYPE HTML>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
		<meta name="format-detection" content="telephone=no,email=no,date=no,aItemress=no">
		<title>弹出菜单</title>
		<link rel="stylesheet" type="text/css" href="../css/aui.css" />
		<link rel="stylesheet" type="text/css" href="../css/app.css" />
	</head>
	<style>
		body,
		html {
			background-color: rgba(0, 0, 0, 0);
		}
	</style>

	<body>
	</body>
	<script type="text/javascript" src="../script/api.js"></script>
	<script type="text/javascript" src="../script/common.js"></script>
	<script type="text/javascript" src="../script/aui-actionsheet.js"></script>
	<script>
		apiready = function() {
			var actionsheet = new auiActionsheet();
			var logined = false;
			if($api.getStorage('userinfo')) {
				logined = true;
				var btn = $api.getStorage('catid') == '1' ? ['评论'] : $api.getStorage('userinfo').id == $api.getStorage('uid') ? ['评论'] : ['评论', '举报']
			} else {
				var btn = $api.getStorage('catid') == '1' ? ['评论'] : ['评论', '举报']
			}
			setTimeout(function() {
				$api.fixTabBar($api.byId('aui-actionsheet'))
			}, 20)
			actionsheet.init({
				frameBounces: true, //当前页面是否弹动，（主要针对安卓端）
				cancelTitle: '取消',
				buttons: btn
			}, function(ret) {
				if(ret) {
					console.log(ret.buttonIndex + '/' + ret.buttonTitle + '//' + logined)
					if(ret.buttonTitle == '评论') {
						if(!logined) {
							openWin_login();
						}else{
							// alert($api.getStorage('article_id'))
							openWin_circle_allcomment(2,$api.getStorage('article_id'))
						}
					}
					if(ret.buttonTitle == '举报') {
						if(!logined) {
							openWin_login();
						}else{
							openWin('circle/report', {type:1}) //2019-9-10 19:11:19
						}
					}
				}
			})
		};
	</script>

</html>
